<?php
/**
 * 基础弹框样式
 * @author milloc
 */

namespace app\widgets;

use yii\widgets\ActiveForm;

class PartialActiveForm extends ActiveForm
{
	public static function begin($options = [])
	{
		$init_options = [
			'options' => ['class' => 'form-horizontal'],
			'fieldConfig' => [
				'template' => "{label}\n<div class=\"col-lg-10\">{input}</div>\n<div class=\"col-lg-12\">{error}</div>",
				'labelOptions' => ['class' => 'control-label col-lg-2', 'style' => 'margin-top: 5px']
			]
		];
		$options = array_merge($init_options, $options);

		return parent::begin($options);
	}
}